home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
mikecom
/
msr.asm
< prev
next >
Wrap
Assembly Source File
|
1987-05-16
|
1KB
|
29 lines
title GET MODEM STATUS REGISTER
include subfx.h
; Mike Dumdei, 6 Holly Lane, Texarakana TX 75503
;**************************************************************************
; ASYNC_MSR -- Returns the modem status register contents in the lower 8
; bits of the returned value (cast to unchar). Returns
; R_NOPORT if an invalid or unopened port is specified.
;**************************************************************************
begseg COMM_TEXT
publicproc _async_msr
push bp
mov bp,sp
push si ;stack frame setup
call __ck_port_arg ;ck if valid, load pointers
jz stat_exit ;bad arg if ZR flag set
mov al,MSR_VAL
xor ah,ah ;AH=0, AL=MSR value
stat_exit:
pop si
pop bp
ret ;restore regs and exit
_async_msr endp
endseg COMM_TEXT
end